<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./node_modules/vue/dist/vue.min.js"></script>
</head>
<body>
    <div id="app">
        hello vue2!
    </div>
    <script>
        const app = new Vue({
            el:"#app",
            data:{
                age:3
            },
            methods:{
                f1(){
                    console.log("i am f1!");
                }
            },
            created(){
                console.log("实例创建完成！");
            },
            mounted(){
                console.log("实例挂载完成！");
                console.log(this.age);//3
                // console.log(app.age);//3
                this.f1();
            }
        })

        console.log(app.age);//3
        app.f1();
        //快捷键生成console.log()
        console.log(1234567);
    </script>
</body>
</html>